<!DOCTYPE html>
<html lang="en" >
<head>
    <title>Atomsk - Option remove atom - Pierre Hirel</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" media="screen" type="text/css" title="Default" href="./default.css" />
    <link rel="icon" href="../img/atomsk_logo.png" type="image/png" />
</head>
   
<body>

<p><a href="./index.html">Back to main menu</a></p>

<h2>Option: remove-atom</h2>

<h4>Syntax</h4>

<p><code>-remove-atom &#60;index&#62;</code></p>

<p><code>-rmatom &#60;index&#62;</code></p>

<p><code>-rmatom &#60;species&#62;</code></p>

<p><code>-rmatom select</code></p>


<h4>Description</h4>

<p>This option removes the atom that has the given index, or all atoms of the given species.</p>

<p>Note that if this atom has a shell (in the sense of a core-shell model) and/or auxiliary properties, they are also deleted. In addition, some of the remaining atoms may have a different index after this option is applied.</p>

<p>If a selection was defined (with the <a href="./option_select.html">option <code>-select</code></a>) then only selected atoms are removed.</p>

<p>The option <code>-rmatom select</code> removes all selected atoms, no matter their index or their species. It is meant to be used after the <a href="./option_select.html">option <code>-select</code></a>, and will not do anything if no selection is defined.</p>



<h4>Default</h4>

<p>By default no atom is removed.</p>



<h4>Examples</h4>

<ul>
<li><code class="command">atomsk initial.cfg -rmatom 1622 final.xsf</code>
<p>This will read the file <code>initial.cfg</code>, remove the atom &#35;1622, and output the result to <code>final.xsf</code>.</p></li>

<li><code class="command">atomsk initial.cfg -rmatom Fe final.xyz</code>
<p>This will remove all iron atoms in the system.</p></li>

<li><code class="command">atomsk initial.cfg -select in sphere 0.5*box 0.5*box 0.5*box 30 -rmatom Si final.xyz</code>
<p>This will <a href="./option_select.html">select atoms in a sphere</a>, and delete all silicium atoms that are part of this selection.</p></li>

<li><code class="command">atomsk initial.cfg -select in sphere 0.5*box 0.5*box 0.5*box 30 -rmatom select final.xyz</code>
<p>This will <a href="./option_select.html">select atoms in a sphere</a>, and delete all atoms that are selected.</p></li>
</ul>


<p><a href="./index.html">Back to main menu</a></p>

</body>

</html>
